home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Libraries / TurboTCP 2.0.1 / TurboTCP source / TCPCompletionProc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-30  |  1.5 KB  |  57 lines  |  [TEXT/MPCC]

  1. /*
  2. ** TCPCompletionProc.cp
  3. **
  4. **    TurboTCP support library
  5. **    TCP asynchronous call completion procedure
  6. **    68K code resource for PowerPC applications
  7. **
  8. **    Copyright © 1993-94, FrostByte Design / Eric Scouten
  9. **
  10. */
  11.  
  12. // •• THIS FILE SHOULD NOT BE INCLUDED IN PowerPC BUILDS! •• 
  13.  
  14.  
  15. #include "TCPCompletionProc.h"
  16.  
  17. #ifndef __MWERKS__
  18. //#pragma options(!force_frame, !profile)
  19. #else
  20. #pragma profile off
  21. #pragma a6frames off
  22. #endif
  23.  
  24.  
  25. //    —— completion procedure ——
  26.  
  27. /*______________________________________________________________________
  28. **
  29. ** TurboTCPCompletionProc
  30. **
  31. **    The asynchronous completion routine. Recieves notification that any asynchronous
  32. **    TCP I/O operation has been completed. This routine is used for all TCP calls placed by
  33. **    CTCPAsyncCall::DoAsyncCall.
  34. **
  35. **    Send notification to the TCP driver object that this call has been completed. The driver
  36. **    then queues the call for processing at the next event loop.
  37. **
  38. **    The struct TurboTCPiopb includes a pointer to the CTCPDriver queue so that we don’t
  39. **    need to access application globals in this loop. This improves performance, and
  40. **    also permits us to use a 68K code resource in an otherwise PowerPC environment
  41. **    to avoid the performance hit of mode switches.
  42. **
  43. **        iopb (struct TCPiobp*):    the TCP I/O parameter block
  44. **
  45. */
  46.  
  47. #ifndef TCL_POWER_PC
  48. #pragma parameter main(__A0)
  49.  
  50. void main(struct TurboTCPiopb* iopb)
  51.  
  52. {
  53.     Enqueue((QElemPtr) &(iopb->itsQElem), iopb->itsQueue);
  54.             // CTCPDriver::ProcessNetEvents will pick this up later
  55. }
  56.  
  57. #endif